<template>
<uni-shadow-root class="partials-gridlist-slide_navigation-index"><template name="slideNavigation">
  <view class="showTypeContainer" :style="'padding: '+((!jsonData.layoutType||jsonData.layoutType==1)?'20rpx 0rpx':'20rpx 30rpx')+';'" v-if="jsonData.showType == 0">
    <block v-if="jsonData.iconType == 0">
      <view v-for="(cells,index) in (jsonData.cells)" :key="cells.index" class="grid_cell" :style="'width:'+(100/ jsonData.column)+'%;'">
        <view :class="' '+(cells.linkUrl)">{{cells.text}}</view>
      </view>
    </block>
    <block v-else>
        <block v-if="(!jsonData.layoutType||jsonData.layoutType==1)">
            <scroll-view scroll-x="true" class="slide_block">
                <view v-for="(cells,index) in (jsonData.cells)" :key="cells.index" class="grid_cell" :style="'width:'+(100/ jsonData.column)+'%;'">
                  <view class="grid_cell_item" v-if="cells.linkUrl!='contact'" :data-link="cells.linkUrl" @click.stop.prevent="tolinkUrl">
                    <image mode="aspectFit" :style="'width: '+(jsonData.bili?jsonData.bili*110:110)+'rpx;height: '+(jsonData.bili?jsonData.bili*110:110)+'rpx'" v-if="cells.iconPath" :src="(cells.iconPath)+'?x-oss-process=style/preview'"></image>
                    <view :class="' '+(cells.loginCheck)" :site_url="cells.linkUrl" :targetType="cells.targetType">
                      {{cells.text}}
                    </view>
                  </view>
                  <button open-type="contact" plain="true" hover-class="none" style="border:none" class="grid_cell_item kefu" v-else>
                    <image mode="aspectFit" :style="'width: '+(jsonData.bili?jsonData.bili*110:110)+'rpx;height: '+(jsonData.bili?jsonData.bili*110:110)+'rpx'" v-if="cells.iconPath" :src="(cells.iconPath)+'?x-oss-process=style/preview'"></image>
                    <view :class="' '+(cells.loginCheck)" :site_url="cells.linkUrl" :targetType="cells.targetType">
                      {{cells.text}}
                    </view>
                  </button>
                </view>
            </scroll-view>
        </block>
        
        <block v-else>
            <view class="grid_cell_block">
                <view v-for="(cells,index) in (jsonData.cells)" :key="cells.index" class="grid_cell_two" style="width:50%">
                  <view class="grid_cell_item_two" :style="'flex-direction:'+(jsonData.layoutType==2?'row':'row-reverse')" v-if="cells.linkUrl!='contact'" :data-link="cells.linkUrl" @click.stop.prevent="tolinkUrl">
                    <view class="grid_cell_item_text_two" :site_url="cells.linkUrl" :style="'align-items:'+(jsonData.layoutType==2?'flex-start':'flex-end')" :targetType="cells.targetType">
                      <text class="text_short" :style="'font-weight: bold;text-align: '+(jsonData.layoutType==2?'left':'right')+';'">{{cells.text}}</text>
                      <text style="font-size: 26rpx;color: #666;margin-top: 14rpx;">{{cells.subText}}</text>
                    </view>
                    <image mode="aspectFit" :style="'width: '+(jsonData.bili?jsonData.bili*150:150)+'rpx;height: '+(jsonData.bili?jsonData.bili*150:150)+'rpx'" v-if="cells.iconPath" :src="(cells.iconPath)+'?x-oss-process=style/preview'"></image>
                  </view>
                  <button open-type="contact" plain="true" hover-class="none" style="border:none" class="grid_cell_item kefu" v-else>
                    <view class="grid_cell_item_text_two" :site_url="cells.linkUrl" :targetType="cells.targetType">
                      {{cells.text}}
                    </view>
                    <image mode="aspectFit" :style="'width: '+(jsonData.bili?jsonData.bili*150:150)+'rpx;height: '+(jsonData.bili?jsonData.bili*150:150)+'rpx'" v-if="cells.iconPath" :src="(cells.iconPath)+'?x-oss-process=style/preview'"></image>
                  </button>
                </view>
            </view>
        </block>
    </block>
  </view>

  <view style="border:1px solid rgb(214,214,214);border-bottom:none;" class="showTypeContainer" v-if="jsonData.showType == 1">
    <block v-if="jsonData.iconType == 0">
          <view v-for="(cells,index) in (cells)" :key="cells.index" class="grid_cell" :style="'width:'+(100/ column)+'%;'">
        <view :class="' '+(cells.linkUrl)">{{cells.text}}</view>
      </view>
    </block>
    <block v-else>
      <view v-for="(cells,index) in (cells)" :key="cells.index" class="grid_cell" :style="'width:'+(100/ column)+'%;'">
        <image :src="cells.iconPath"></image>
        <view :class="' '+(cells.loginCheck)" :site_url="cells.linkUrl" :targetType="cells.targetType">
          {{cells.text}}
        </view>
      </view>
    </block>
  </view>
  <view class="showTypeContainer3" v-if="showType == 3">
      <block v-for="(cells,index) in (cells)" :key="cells.index">
        <block v-if="index == 0">
          <view class="grid_cell3_1" :data-link="cells.linkUrl" @click="tolinkUrl">
            <image mode="scaleToFill" :src="(cells.iconPath)+'?x-oss-process=style/preview'"></image>
          </view>
        </block>
        <block v-else>
          <view class="grid_cell3_2" :data-link="cells.linkUrl" @click="tolinkUrl">
            <image mode="scaleToFill" :src="(cells.iconPath)+'?x-oss-process=style/preview'"></image>
          </view>
        </block>
      </block>
  </view>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/gridlist/slide_navigation/index'

Component({})

export default global['__wxComponents']['partials/gridlist/slide_navigation/index']
</script>
<style platform="mp-weixin">
.slide_block{
    display: flex;
    flex-direction: row;
    white-space: nowrap;

}
.grid_cell{
    display: inline-flex;
}
</style>